<?php if(is_active_sidebar('top-widget')): ?>
<div id="top-widget">
<?php dynamic_sidebar('top-widget'); ?>
</div>
<?php endif; ?>